//
//  Price.m
//  yuimall_Iphone
//
//  Created by yuike6 yuike6 on 12-4-16.
//  Copyright (c) 2012年 yuike. All rights reserved.
//

#import "Price.h"
#import "header.h"

@implementation Price
@synthesize price;

-(void) dealloc
{
    YRelease(price);
    [super dealloc];
}

-(void) privateInit
{
    self.price = [NSNumber numberWithDouble:[[self.xmlTree valueAtPath:[[self.xmlTree root] name]] doubleValue]];
}

-(id) initWithXmlTree:(XMLParsedTree *)tree
{
    self = [super initWithXmlTree:tree];
    if (self) {
        [self privateInit];
    }
    
    return self;
}


-(id) initWithXmlString:(NSString *)xmlString
{
    self = [super initWithXmlString:xmlString];
    if (self) {
        [self privateInit];
    }
    return self;
}

-(id) initWithXmlData:(NSData *)xmlData
{
    self = [super initWithXmlData:xmlData];
    if (self) {
        [self privateInit];
    }
    return self;
}

@end
